#include<iostream>
#include<string>
using namespace std;

bool isUnique(string astr) {
    if (astr.size() > 26) return false;
    int n = 0;
    for (int i = 0; i < astr.size(); i++)
    {
        int x = astr[i] - 97;
        cout << ((n >> x) & 1) << endl;
        cout << ((n >> x) | 1) << endl;
        if (((n >> x) & 1) == 1)  return false;
        
        n = n| (1<<x);
    }
    return true;
}

int main()
{
    string s = "leetcode";
    cout << isUnique(s) << endl;

	return 0;
}